﻿using YAPL.Language.Ast;
using Xunit;

namespace YAPL.Test.YAPL.Language.Ast {
	public class VariableExpressionTest {
		[Fact]
		public void NodeEqualsShouldWorkCorrectly() {
			var var1 = Expressions.Variable("a");
			var var2 = Expressions.Variable("b");

			Assert.False(var1.NodeEquals(null));
			Assert.False(var1.NodeEquals(var2));
			Assert.True(var1.NodeEquals(var1));
			Assert.False(var1.NodeEquals(Expressions.StringLiteral("dd")));
		}
	}
}
